<?php 
session_start();
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="public/CSS/works.css" type="text/css"/>
        <title>pham thanh anh chau</title>
    </head>
    <body>
        <div id="bg">
            <div class="forum">
                <?php include './html/header.php';?>
                
                <h1 align="center" style="margin-top: 82px">WORKS</h1>
                <?php
                require_once 'model/works.php';
                $worker = new Works();
                $work = $worker->select_edit(NULL, $_GET['id']);
                ?>
                <form  action="view.php?id=<?php echo $_GET["id"] ?>" method="post" enctype="multipart/form-data">
                    <fieldset style="border: 2px #666666 solid">
                        <legend style="border: 3px #666666 solid; background: #6666ff; color: white">
                            View
                        </legend>
                        <table style="width: 1080px">
                            <tr class="bgtable2">
                                <th>ten cong viec</th>
                                <td><?php echo $work["name"] ?></td>
                            </tr>
                            <tr class="bgtable2">
                                <th>Ngay dang</th>
                                <td><?php $mydate = getdate($work['posted']); ?> 
                                    <?php echo "$mydate[mday] $mydate[month], $mydate[year]"; ?></td>
                            </tr>
                            <tr class="bgtable2">
                                <th>Lam viec tai</th>
                                <td><?php echo $work["location"] ?></td>
                            </tr>
                            <tr class="bgtable2">
                                <th>Ten cong ty</th>
                                <td><?php echo $work["company_name"] ?></td>
                            </tr>
                            <tr class="bgtable2">
                                <th>Dia chi</th>
                                <td><?php echo $work["company_address"] ?></td>
                            </tr>
                            <tr class="bgtable2">    
                                <th>mo ta cong viec</th>
                                <td><?php echo $work["description"] ?></td>
                            </tr>
                            <tr class="bgtable2">
                                <th>Dieu kien</th>
                                <td><?php echo $work["experience_requirements"] ?></td>
                            </tr>
                            <tr class="bgtable2">
                                <th>Lien he</th>
                                <td><?php echo $work["company_profile"] ?></td>
                            </tr>
                            <tr class="bgtable2">
                                <th>Hinh anh</th>
                                <td><img src="<?php echo $work['image']?>" width="100px" height="100px"></td>
                            </tr>
                                         
                        </table>
                    </fieldset>
                </form>
                <?php include './html/footer.php';?>
            </div>
        </div>
    </body>
</html>